package cn.edu.sdjzu.xg.bysj.domain;

import cn.edu.sdjzu.xg.bysj.domain.Teacher;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.io.Serializable;

/**
 * 表示一个目标导师和对应的志愿顺序
 * 本类使用了lombok注解
 */
//无参构造器
@NoArgsConstructor
@Setter
@Getter
@AllArgsConstructor //全参构造器
//表示一个目标导师和对应的志愿顺序
public class ApplicationForSupervisorEntry implements Comparable<ApplicationForSupervisorEntry>, Serializable {

    //本类不需id
    //目标导师
    private Teacher teacher;
    //志愿顺序
    private int priority;
    private ApplicationForSupervisor applicationForSupervisor;

    @Override
    public int compareTo(ApplicationForSupervisorEntry applicationForSupervisorEntry) {
        return this.priority - applicationForSupervisorEntry.priority;
    }

}
